package eHealth.android.Helpers;

/**
 * 
 * @author Thomas Rouvinez
 * CreationDate: 19.04.2012
 * 
 * Goal: provide a pojo to store baked statistics for easier data display in the
 * GUI. Can be used on both GWT and Android clients.
 *
 */
public class StatisticsHelper {
	
	// --------------------------------------------------------------------------------
	// Variables.
	// --------------------------------------------------------------------------------
	
	/**
	 * Mean values vector
	 * <p>Data storage for all the mean values for each type of medical data</p>
	 */
	private double mean[];
	
	/**
	 * Mean values vector
	 * <p>Data storage for all the mean values for each type of categorical medical data</p>
	 */
	private double meanCategory;
	
	/**
	 * Minimum values vector
	 * <p>Data storage for all the minimum values for each type of medical data</p>
	 */
	private double min[];
	
	/**
	 * Minimum values vector
	 * <p>Data storage for all the minimum values for each type of categorical medical data</p>
	 */
	private double minCategory;
	
	/**
	 * Maximum values vector
	 * <p>Data storage for all the maximum values for each type of medical data</p>
	 */
	private double max[];
	
	/**
	 * Maximum values vector
	 * <p>Data storage for all the maximum values for each type of categorical medical data</p>
	 */
	private double maxCategory;
	
	/**
	 * Categorical values matrix
	 * <p>Data storage for all the categorical values for category-specific types of 
	 * medical data</p>
	 */
	private StatisticsHelper[][] categoryStatistics;
	
	// --------------------------------------------------------------------------------
	// Constructor.
	// --------------------------------------------------------------------------------
	
	/**
	 * Emptpy Constructor.
	 */
	public StatisticsHelper(){}
	
	// --------------------------------------------------------------------------------
	// Getters - setters.
	// --------------------------------------------------------------------------------
	
	/**
	 * Getter for mean values' vector.
	 * @return mean vector of values.
	 */
	public double[] getMean() {
		return mean;
	}
	
	/**
	 * Getter for category-related values' matrix.
	 * @return categoryStatistics matrix of values.
	 */
	public StatisticsHelper[][] getCategoryStatistics() {
		return categoryStatistics;
	}
	
	/**
	 * Setter for the category statistics matrix.
	 * @param categoryStatistics
	 */
	public void setCategoryStatistics(StatisticsHelper[][] categoryStatistics){
		this.categoryStatistics = categoryStatistics;
	}

	/**
	 * Getter for minimal values' vector.
	 * @return vector of minimum values.
	 */
	public double[] getMin() {
		return min;
	}

	/**
	 * Setter for minimal values' vector.
	 * @param min
	 */
	public void setMin(double[] min) {
		this.min = min;
	}

	/**
	 * Getter for maximum values' vector.
	 * @return maximum values vector
	 */
	public double[] getMax() {
		return max;
	}

	/**
	 * Setter for maximum values' vector.
	 * @param max
	 */
	public void setMax(double[] max) {
		this.max = max;
	}

	/**
	 * Setter for mean values' vector.
	 * @param mean
	 */
	public void setMean(double[] mean) {
		this.mean = mean;
	}

	/**
	 * Getter for mean categorical values.
	 * @return the mean value of the category statistic.
	 */
	public double getMeanCategory() {
		return meanCategory;
	}

	/**
	 * Setter for mean categorical values.
	 * @param meanCategory
	 */
	public void setMeanCategory(double meanCategory) {
		this.meanCategory = meanCategory;
	}

	/**
	 * Getter for minimum categorical values.
	 * @return the minimum value of the category statistic.
	 */
	public double getMinCategory() {
		return minCategory;
	}

	/**
	 * Setter for minimum categorical values.
	 * @param minCategory
	 */
	public void setMinCategory(double minCategory) {
		this.minCategory = minCategory;
	}

	/**
	 * Getter for maximum categorical values.
	 * @return the maximum value of the category statistic.
	 */
	public double getMaxCategory() {
		return maxCategory;
	}

	/**
	 * Setter for maximum categorical values.
	 * @param maxCategory
	 */
	public void setMaxCategory(double maxCategory) {
		this.maxCategory = maxCategory;
	}
}
